package cn.bonoon.kernel.web.components;

import cn.bonoon.kernel.descriptors.UIPropertyAccessor;
import cn.bonoon.kernel.web.annotations.components.AsComponent;
import cn.bonoon.kernel.web.html.UIPropertyBuilder;
import cn.bonoon.kernel.web.html.form.ComponentPropertyParser;

public class StandardComponent implements Component {
	private final AsComponent com;
	
	public StandardComponent(ComponentPropertyParser property, UIPropertyAccessor accessor, AsComponent com) {
		this.com = com;
	}

	@Override
	public void build(UIPropertyBuilder builder) {
		com.type().parse(builder.getInitHtml(), com.value());
	}
}
